<%@ page import="ro.xblue.translator.LanguageBean,
                 ro.xblue.translator.TranslatorUtils,
                 ro.gateway.aida.obj.Organization,
                 ro.gateway.aida.obj.Activity,
                 java.util.ArrayList"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%LanguageBean lang_bean = TranslatorUtils.getCurrentLanguage(request, application);%>

<logic:present name="__activity">
<logic:present name="__activity" property="fundingOrgs">
      <bean:define id="activity" name="__activity" />
      <logic:iterate indexId="index"  id="org_inv" name="__activity" property="fundingOrgs">
            <logic:greaterThan value="0" name="index" >
                  <br><br>
                  <br><br>
            </logic:greaterThan>

            <bean:define id="org" name="org_inv" property="org" />             
            <a href=# onclick="javascript:window.open('<html:rewrite page="/org/view?"/>id=<%=((Organization)org).getId()%>', 'org_viewer', 'status=yes,WIDTH=400,HEIGHT=400,SCROLLBARS=yes');">
				<%=((Organization)org).getName().getString(lang_bean.getLanguage())%></a>
            <br><br>
            <%
                  ArrayList fitems = ((Activity)activity).
                        getFndItemsForOrg(((Organization)org).getId());
                  if (fitems != null) request.setAttribute("fitems", fitems);
                  else request.removeAttribute("fitems");
            %>
            <logic:present name="fitems" >
            <logic:iterate id="item" name="fitems">
                  <bean:define id="funding_item" toScope="request" name="item" ></bean:define>
                  <table with="100%" cellpadding="0" cellspacing="0" border="1">
                        <tr><td>
                          <% pageContext.include("/fnd2/funding_displayer.jsp"); %>
                        </td></tr>
                  </table>
            </logic:iterate>
            </logic:present>
      </logic:iterate>
</logic:present>
</logic:present>